﻿<?xml version="1.0" encoding="utf-8" ?>

<!-- The MIT License (MIT)

 Copyright (c) 2015 FramTack, LLC

 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 
 to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 
 and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 DEALINGS IN THE SOFTWARE.

 For more information visit the project home page at http://solutionfamily.codeplex.com or the owner's site at http://solution-family.com
-->

<J1939>
    <SupportedDevices>
        <Device Name="Engine Controller">
            <!-- Parameter DataType defaults to "double" -->
            <!-- Parameter Scale defaults to "1" -->
            <!-- Parameter Offset defaults to "0" -->
            <!-- TransmissionRate is in milliseconds.  -1 means "on request". Default is "-1" -->
            <ParameterGroup PGN="65267" Name="Vehicle Position" TransmissionRate="5000">
                <Parameter SPN="584" Name="Latitude" Units="°" DataOffset ="0" DataLength="4" Scale="1.0E-7" Offset="-210" />
                <Parameter SPN="585" Name="Longitude" Units="°" DataOffset ="4" DataLength="4" Scale="1.0E-7" Offset="-210" />
            </ParameterGroup>
            <ParameterGroup PGN="65256" Name="Vehicle Direction/Speed" TransmissionRate="-1">
                <!-- need to fix scale/offset -->
                <Parameter SPN="165" Name="Bearing" Units="°" DataOffset ="0" DataLength="2" Scale="1" Offset="0" />
                <Parameter SPN="517" Name="Speed" Units="km/h" DataOffset ="2" DataLength="2" Scale="0.00390625" Offset="0" />
                <!-- need to fix scale/offset -->
                <Parameter SPN="583" Name="Pitch" Units="°" DataOffset ="4" DataLength="2" Scale="1" Offset="0" />
                <Parameter SPN="580" Name="Altitude" Units="m" DataOffset ="6" DataLength="2" Scale="0.125" Offset="-2500" />
            </ParameterGroup>
            <ParameterGroup PGN="65262" Name="Engine Temperature 1" TransmissionRate="1000">
                <Parameter SPN="110" Name="Coolant Temp" Units="°C" DataOffset ="0" DataLength="1" Scale="1" Offset="-40" />
                <Parameter SPN="174" Name="Fuel Temp" Units="°C" DataOffset ="1" DataLength="1" Scale="1" Offset="-40" />
                <Parameter SPN="175" Name="Oil Temp" Units="°C" DataOffset ="2" DataLength="2" Scale="0.03125" Offset="-273" />
                <Parameter SPN="176" Name="Turbo Oil Temp" Units="°C" DataOffset ="4" DataLength="2" Scale="0.03125" Offset="-273" />
                <Parameter SPN="52" Name="Intercooler Temp" Units="°C" DataOffset ="6" DataLength="1" Scale="1" Offset="-40" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="1134" Name="Intercooler TStat Opening" Units="°C" DataOffset ="7" DataLength="1" Scale="1" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65269" Name="Ambient Conditions" TransmissionRate="1000">
                <Parameter SPN="108" Name="Barometric Pressure" Units="kPa" DataOffset ="0" DataLength="1" Scale="0.5" Offset="0.0" />
                <Parameter SPN="170" Name="Cab Interior Temp" Units="°C" DataOffset ="1" DataLength="2" Scale="0.03125" Offset="-273" />
                <Parameter SPN="171" Name="Ambient Air Temp" Units="°C" DataOffset ="3" DataLength="2" Scale="0.03125" Offset="-273" />
                <Parameter SPN="172" Name="Air Inlet Temp" Units="°C" DataOffset ="5" DataLength="1" Scale="1" Offset="-40" />
                <Parameter SPN="79" Name="Road Surface Temp" Units="°C" DataOffset ="6" DataLength="2" Scale="0.03125" Offset="-273" />
            </ParameterGroup>
            <ParameterGroup PGN="65257" Name="Fuel Consumption" TransmissionRate="1000">
                <Parameter SPN="182" Name="Trip Fuel" Units="kg" DataOffset ="0" DataLength="4" Scale="0.5" Offset="0" />
                <Parameter SPN="250" Name="Total Fuel" Units="kg" DataOffset ="4" DataLength="4" Scale="0.5" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="61444" Name="EEC1" TransmissionRate="100">
                <!-- need to add support for bit fields -->
                <!-- <Parameter SPN="899" Name="Status" Units="" DataOffset ="0" DataLength="1" Scale="1" Offset="0" /> -->
                <Parameter SPN="512" Name="Torque Demand" Units="%" DataOffset ="1" DataLength="1" Scale="1" Offset="-125" />
                <Parameter SPN="513" Name="Torque Actual" Units="%" DataOffset ="2" DataLength="1" Scale="1" Offset="-125" />
                <Parameter SPN="190" Name="Engine Speed" Units="rpm" DataOffset ="3" DataLength="2" Scale="0.125" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="61443" Name="EEC2.1" TransmissionRate="50">
                <!-- need to add support for bit fields -->
                <Parameter SPN="91" Name="Accelerator Position 1" Units="%" DataOffset ="1" DataLength="1" Scale="0.4" Offset="0" />
                <Parameter SPN="92" Name="Engine Load" Units="%" DataOffset ="2" DataLength="1" Scale="1" Offset="0" />
                <Parameter SPN="974" Name="Remote Accelerator Position" Units="%" DataOffset ="3" DataLength="1" Scale="0.4" Offset="0" />
                <Parameter SPN="29" Name="Accelerator Position 2" Units="%" DataOffset ="1" DataLength="1" Scale="0.4" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65270" Name="EEC2.2" TransmissionRate="500">
                <Parameter SPN="81" Name="Particulate Trap Pressure" Units="unknown" DataOffset ="0" DataLength="1" Scale="1" Offset="0" />
                <Parameter SPN="102" Name="Boost Pressure" Units="kPa" DataOffset ="1" DataLength="1" Scale="2" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="105" Name="Intake Manifold Temp" Units="°C" DataOffset ="2" DataLength="1" Scale="1" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="106" Name="Air Inlet Pressure" Units="unknown" DataOffset ="3" DataLength="1" Scale="1" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="107" Name="Air Filter Differential Pressure" Units="unknown" DataOffset ="4" DataLength="1" Scale="1" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="173" Name="Exhaust Gas Temp" Units="°C" DataOffset ="5" DataLength="2" Scale="1" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="112" Name="Coolant Filter Differential Pressure" Units="unknown" DataOffset ="7" DataLength="1" Scale="1" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65132" Name="Tachograph" TransmissionRate="50">
                <!-- need to add support for bit fields -->
                <!-- need to validate scale/offset -->
                <Parameter SPN="1623" Name="Output Shaft Speed" Units="unknown" DataOffset ="4" DataLength="2" Scale="1" Offset="0" />
                <Parameter SPN="1624" Name="Vehicle Speed" Units="km/h" DataOffset ="6" DataLength="2" Scale="0.00390625" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65271" Name="Vehicle Electrical Power" TransmissionRate="1000">
                <!-- need to validate scale/offset -->
                <Parameter SPN="114" Name="Battery Current" Units="unknown" DataOffset ="0" DataLength="1" Scale="1" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="115" Name="Alternator Current" Units="unknown" DataOffset ="1" DataLength="1" Scale="1" Offset="0" />
                <Parameter SPN="167" Name="Alternator Voltage" Units="V" DataOffset ="2" DataLength="2" Scale="0.05" Offset="0" />
                <Parameter SPN="168" Name="System Voltage" Units="V" DataOffset ="4" DataLength="2" Scale="0.05" Offset="0" />
                <Parameter SPN="158" Name="Battery Voltage" Units="V" DataOffset ="6" DataLength="2" Scale="0.05" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65266" Name="Fuel Economy" TransmissionRate="100">
                <Parameter SPN="183" Name="Fuel Rate" Units="L/h" DataOffset ="0" DataLength="2" Scale="0.05" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="184" Name="Instant Fuel Economy" Units="unknown" DataOffset ="2" DataLength="2" Scale="1" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="185" Name="Average Fuel Economy" Units="unknown" DataOffset ="4" DataLength="2" Scale="1" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65263" Name="Engine Fluid Level/Pressure" TransmissionRate="500">
                <Parameter SPN="94" Name="Fuel Delivery Pressure" Units="kPa" DataOffset ="0" DataLength="1" Scale="4" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="98" Name="Engine Oil Level" Units="unknown" DataOffset ="2" DataLength="1" Scale="1" Offset="0" />
                <Parameter SPN="100" Name="Engine Oil Pressure" Units="kPA" DataOffset ="3" DataLength="1" Scale="4" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="101" Name="Crankcase Pressure" Units="unknown" DataOffset ="4" DataLength="2" Scale="1" Offset="0" />
                <Parameter SPN="109" Name="Coolant Pressure" Units="kPA" DataOffset ="6" DataLength="1" Scale="2" Offset="0" />
                <!-- need to validate scale/offset -->
                <Parameter SPN="111" Name="Coolant Level" Units="unknown" DataOffset ="7" DataLength="1" Scale="1" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65253" Name="Engine Hours and Revolutions" TransmissionRate="-1">
                <Parameter SPN="247" Name="Total Engine Hours" Units="h" DataOffset ="0" DataLength="4" Scale=".05" Offset="0" />
                <Parameter SPN="249" Name="Total Engine Revolutions" Units="r" DataOffset ="4" DataLength="4" Scale="1000" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65214" Name="EEC4" TransmissionRate="-1">
                <!-- need to validate scale/offset -->
                <Parameter SPN="166" Name="Rated Engine Power" Units="unknown" DataOffset ="0" DataLength="2" Scale="1" Offset="0" />
                <Parameter SPN="189" Name="Rated Engine Speed" Units="rpm" DataOffset ="2" DataLength="2" Scale="0.125" Offset="0" />
            </ParameterGroup>
            <ParameterGroup PGN="65260" Name="Vehicle Identification Number" TransmissionRate="-1">
                <Parameter SPN="1" Name="VIN" Units="text" DataOffset ="0" DataLength="-1" DataType="string" />
            </ParameterGroup>
        </Device>
    </SupportedDevices>
</J1939>
